#include "widget.h"
#include "ui_widget.h"
#include<QDebug>
#include<QMutex>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    Thread tid1;
    Thread tid2;
    tid1.start();
    tid2.start();
    tid1.wait();
    tid2.wait();
    qDebug()<<Thread::val;
}

Widget::~Widget()
{
    delete ui;
}

